{% extends "PopshouseAdminBundle::layout.html.twig" %}

{% block title %}
Achtergronden
{% endblock %}

{% block js %}
admin('image','','{{ path('bg_delete_dummy') }}');
{% endblock %}

{% block content %}
<div class="left side">
    {% include "PopshouseAdminBundle:Background:menu.html.twig"  %}
</div>
<div class="left content" style="width:670px">
        
	 <h2>Achtergronden</h2>
	 {% if app.session.hasFlash('notice') %}
        <div class="message message-green">
            {{ app.session.flash('notice') }}
            <span class="close"><img src="{{ asset('images/layout/admin/icon/close_green.png') }}" alt="sluit" /></span>
        </div>
    {% endif %}

    
	  <p><a href="{{ path('bg_new') }}" class="action"><span>+ Achtergrond toevoegen</span></a></p>
	 
	<div>
	<ol class="images">
    {% for image in images %}
    <li id="image_{{ image.id }}">
    
   <div class="foto">
       <div id="tools" style="display:none;float:left;position:absolute;">
       <a class="noborder" id="delete" imageid="{{ image.id }}" href="{{ path('bg_delete',{'id':image.id}) }}"><img src="{{ asset('images/layout/icons/delete.png') }}" class="clickable" /></a>
    </div>
    <a href="{{ path('bg_edit', {'id':image.id}) }}"><img src="{{ asset('images/photo/backgrounds/' ~ image.id ~ 't.jpg') }}" class="bg" /></a>
      <div id="dialog_{{ image.id }}" style="display:none;" title="Bevestig verwijderen?">

            Weet je zeker dat je deze achtergrond "{{ ("title."~image.id) | trans({},"images") | raw }}" wil verwijderen?

        </div>
    </li>
    {% endfor %}
	</ol>
	</div>
</div>
{% endblock %}